sub structure {
	$head = ('
		<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
		<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="de">
  			<head>
				<meta http-equiv="Content-type" content="text/html;charset=UTF-8, iso-8859-1" /> 
				<title>Xenter - Management UI @'.$ENV{"TERM"}.'</title>
				'.&importCSS().'
			</head>
			<body>');
	$footer = ('
			</body>
		</html>
	');
}
sub parseQueryString {
	$cutoff = index($_[0], "?")+1;
	my $queryString = substr($_[0],$cutoff,(length($_[0])-$cutoff));
	my %data;
	foreach (split /\&/, $queryString) {
		my ($key, $val) = split(/\=/);
	    $data{"$key"} = $val;
	}
	return %data;  
}
sub parsePostFields {
	read(STDIN, $tmpStr, $ENV{"CONTENT_LENGTH"});
	my %data;
	foreach (split /\&/, $tmpStr) {
		my ($key, $val) = split(/\=/);
		#$value =~ ( s/%23/\#/g );
		#$value =~ ( s/%2F/\//g );
		$data{"$key"} = $val;
	}
	return %data;
} 
sub importCSS {
	open(CSS, "layout.css");
	my @cssLines = <CSS>;
	close(CSS);
	my $css = join("\n",@cssLines);
	return '<style type="text/css"><!--'.$css.'--></style>';  
}
